package com.zmn.oms.persistence.interfaces.warranty;

import com.zmn.oms.model.entity.warranty.OrderWarrantyProduct;

import java.util.Date;
import java.util.List;

import com.zmn.oms.model.entity.warranty.WarrantyQuery;
import org.apache.ibatis.annotations.Param;

/**
 * 类描述：保修卡产品
 *
 * @author heciqi
 * @date 2018/11/29 17:01
 */
public interface OrderWarrantyProductDao {

	int countProExtIdByWarrId(Long warrId);

	List<OrderWarrantyProduct> listByWarrId(Long warrId);

	List<OrderWarrantyProduct> listByQuery(WarrantyQuery query);

	List<OrderWarrantyProduct> listOrderWarrantyProductByOrderIdList(@Param("orderIdList") List<Long> orderIdList);

	Integer insertAll(@Param("orderWarrantyProductList") List<OrderWarrantyProduct> orderWarrantyProductList);

	int updateExpiredTime(OrderWarrantyProduct record);

	int deleteByWarrId(Long warrId);

	int deleteByWarrIdAndProExtId(@Param("warrId") Long warrId, @Param("proExtId") Long proExtId);

    void updateWarrantyMonth(@Param("orderId") Long orderId, @Param("completeTime") Date completeTime, @Param("month") Integer month);
}